Prime Number Calculator

The natural numbers with only two divisors are called the primes. The largest known prime is 282589933 - 1 discovered on December 21, 2018. This is a Mersenne prime of the form Mp = 2p - 1.

The calculator returns either a list of primes up to the limit input by the user or checks to see whether the number input is prime.

The limit is based solely on your patience. A limit of 1,000,000 takes about a second to calculate. But scrolling through the list of 78,498 primes takes significantly longer.

An interesting prime generating equation is the following: f ( n ) = n 2 - n + 41 For all n 10 6 22% of all f ( n ) are prime. The second input box will calculate these primes up to the specified limit.

A limit of 100,000 takes about 40 seconds to calculate as many of the primes found by the equation are quite large, e.g. the largest: 9,999,100,061.

Of interest is the following prime, 357686312646216567629137. It is the longest left-truncatable prime: you always get a prime no matter how many leading digits you remove.




Enter a limit and hit the button:






Prime generator function